Skip to content

examples/rpmsgchar: add an rpmsg char test program - #4081

Open
CV-Bowen wants to merge 2 commits into
apache:masterfrom
CV-Bowen:up/P104-rpmsgchar
Open

CV-Bowen wants to merge 2 commits into
apache:masterfrom
CV-Bowen:up/P104-rpmsgchar

Conversation

@CV-Bowen

@CV-Bowen CV-Bowen commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add examples/rpmsgchar, a test program for the rpmsg char driver added
in apache/nuttx#21981:

  • -t echo: creates an endpoint through the rpmsg device
    (/dev/rpmsg/<cpu>), opens /dev/rpmsg-<name> and checks 1000 round
    trips of 12 bytes against an echo service on the peer.
  • -t destroy: creates 100 endpoints, does one round trip on each, then
    releases them.

The same source also builds for Linux (<linux/rpmsg.h>), so it can test
a NuttX peer from a Linux host.

Depends on apache/nuttx#21981.

Impact

New example, CONFIG_EXAMPLES_RPMSGCHAR (depends on RPMSG_CHAR),
default n. No other change.

Testing

Host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205

Built with CMake and make on sim:rpserver with CONFIG_RPMSG_CHAR and
CONFIG_EXAMPLES_RPMSGCHAR, no warning.

Run on qemu-armv8a:rpserver + rpproxy (rptun ivshmem) against a
test-only echo server on the proxy; the full setup and logs are in
apache/nuttx#21981:

command on the server result (3 runs)
rpmsgchar -t echo -c /dev/rpmsg/proxy -n t0 Finish the echo test
rpmsgchar -t destroy -c /dev/rpmsg/proxy -n d End the destroy test

CV-Bowen and others added 2 commits November 18, 2026 12:45
rpmsgchar exercises the rpmsg char driver: "-t echo" creates an endpoint
through the rpmsg device (/dev/rpmsg/<cpu>) and checks 1000 round trips
of 12 bytes against an echo service on the peer. The same source builds
for Linux, where the endpoint device is /dev/rpmsgX.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
…troy test

Report a failure and return instead of asserting, so the program can be
used as a test, close the endpoint device before the next round, and add
a "destroy" test that creates 100 endpoints, does one round trip on each
and releases them.

Signed-off-by: chenzihan1 <chenzihan1@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants